package com.sisreq.elementos;

import java.text.ParseException;

import javax.swing.JFormattedTextField;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.MaskFormatter;

@SuppressWarnings("serial")
public class MyCentroResultadoTextField extends JFormattedTextField {

	public MyCentroResultadoTextField() {
		try {  
		     MaskFormatter formatter = new MaskFormatter("###.##.###");  
		     formatter.setPlaceholderCharacter(' ');  
		     this.setFormatterFactory(new DefaultFormatterFactory(formatter));  
		}  
		catch (ParseException ex) {  
		     ex.printStackTrace();  
		} 
	}	
}
